<template>
    <div class="special-detail">
         <h5>{{detail.title}}</h5>
         <img :src="detail.pic">
         <div v-html="detail.content"></div>
    </div>
</template>
<script>
import yxHeader from '@/components/yxHeader'
import {ref,reactive,toRefs,computed} from 'vue'
import {useStore} from 'vuex'

import { Notify } from 'vant';
import {useRoute} from 'vue-router'
import {getNewsDetail} from '@/utils/home'
export default {
    setup(){
        const route = useRoute()
        const id = route.params.id
        const data = reactive({
            // newList:[]
            detail:{}
        })
        getNewsDetail({id:id}).then(res=>{
            console.log(res)
            data.detail = res.data
        })
        return {...toRefs(data)}
    },
    components:{
        yxHeader
    }
}
</script>
<style lang="scss" scoped>
.special-detail{
    text-align:center;
    padding:10px;
    h5{
        margin:20px 0;
    }
    img{
        width:100%;
        height:225px;
    }
    :deep(p){
        font-size:14px;
        line-height:35px;
    }
}
</style>